package cn.yuanqiao.archive.bianyan.mapper;

import cn.yuanqiao.archive.bianyan.domain.YqZtcgFile;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @ProjectName: ruoyi-modules-system
 * @Package: cn.yuanqiao.archive.bianyan.mapper
 * @ClassName: YqZtcgFileMapper
 * @Author: lenovo
 * @Description: hbWang
 * @Date: 2023/7/11 13:57
 * @Version: 1.0
 */
public interface YqZtcgFileMapper {
    /**
     * 查询成果附件
     *
     * @param chengguoId
     * @return 成果附件
     */
    public List<YqZtcgFile> selectYqZtcgFileByCgId(@Param("chengguoId") String chengguoId, @Param("tableNmae") String tableNmae);

    public YqZtcgFile selectYqZtcgFileById(@Param("fileId") String fileId, @Param("tableNmae") String tableNmae);

    /**
     * 查询需要下载的附件
     * @param chengguoId
     * @param tableNmae
     * @return
     */
    public List<YqZtcgFile> selectYqZtcgFileDownl(@Param("chengguoId") String[] chengguoId, @Param("tableNmae") String tableNmae);

    /**
     * 新增成果附件
     *
     * @param yqZtcgFile 成果附件
     * @return 结果
     */
    public int insertYqZtcgFile(@Param("yqZtcgFile") List<YqZtcgFile> yqZtcgFile, @Param("tableName") String tableName);

    public int insertYqZtcgFilee(@Param("yqZtcgFile") YqZtcgFile yqZtcgFile, @Param("tableName") String tableName);

    /**
     * 修改成果附件
     *
     * @param yqZtcgFile 成果附件
     * @return 结果
     */
    public int updateBzYqZtcgFile(@Param("yqZtcgFile") YqZtcgFile yqZtcgFile, @Param("tableNmae") String tableNmae);

    /**
     * 删除成果附件
     *
     * @param chengguoId 专题成果主键
     * @return 结果
     */
    public int deleteYqZtcgFileByCgId(@Param("chengguoId") String chengguoId, @Param("tableNmae") String tableNmae);

    public int deleteYqZtcgFileById(@Param("id") String id, @Param("tableNmae") String tableNmae);

    /**
     * 批量删除成果附件
     *
     * @param chengguoId 专题成果主键
     * @return 结果
     */
    public int deleteYqZtcgFileByFileIds(@Param("chengguoId") String[] chengguoId, @Param("tableNmae") String tableNmae);
}
